home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / applic / ntp / depredated / ntp.3.4 / patches / patch2.Z / patch2
Encoding:
Text File  |  1991-09-29  |  16.1 KB  |  550 lines

  1. System: ntp version 3.4
  2. Patch #: 2
  3. Priority: 
  4. From:
  5.  
  6. Description:
  7. ntp:
  8. Use a connected UDP socket to pick up ICMP generated errors.  This will
  9. allow us to recognized ICMP port unreachable messages when use use the
  10. ntp program on a host with no NTP service.
  11.     
  12. ntpd:
  13. Add some fiddles for BROADCAST NTP mode.  In the receive procedure, set the
  14. reachability shift register of peers that are configured, even if we won't
  15. synchronized to them.  Fix adjustment of delay in the process_packet()
  16. routine.  Repair byteswapping problem.
  17.  
  18. ntpdc:
  19. The peer->refid field was being htonl()'ed when it was already in network
  20. byte order.
  21. Display dispersion in milliseconds.  The peer->refid field was being ntohl()'ed
  22. when it should have stayed in network byte order.
  23.  
  24.  
  25. Repeat-By:
  26.  
  27. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your ntp source
  28.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  29.     If you don't have the patch program, apply the following by hand,
  30.     or get patch (version 2.0, latest patchlevel).
  31.  
  32.     After patching:
  33.         make depend
  34.         make
  35.         make install
  36.  
  37.     If patch indicates that patchlevel is the wrong version, you may need
  38.     to apply one or more previous patches, or the patch may already
  39.     have been applied.  See the patchlevel.h file to find out what has or
  40.     has not been applied.  In any event, don't continue with the patch.
  41.  
  42.     If you are missing previous patches they can be obtained from me:
  43.  
  44.     Louis A. Mamakos
  45.     louie@trantor.umd.edu
  46.  
  47.     You can also get the patches via anonymous FTP from
  48.     trantor.umd.edu.
  49.  
  50. Index: patchlevel.h
  51. Prereq: 1
  52. 1c1
  53. < #define PATCHLEVEL 1
  54. ---
  55. > #define PATCHLEVEL 2
  56.  
  57. Index: ntp.c
  58. Prereq: 3.4.1.1
  59. *** ntp.c.old    Wed Mar 22 18:04:24 1989
  60. --- ntp.c    Wed Mar 22 18:04:24 1989
  61. ***************
  62. *** 1,9 ****
  63.   #ifndef    lint
  64. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntp.c,v 3.4.1.1 89/03/20 00:02:32 louie Exp $";
  65.   #endif    lint
  66.   
  67.   /*
  68.    *  $Log:    ntp.c,v $
  69.    * Revision 3.4.1.1  89/03/20  00:02:32  louie
  70.    * patch1: Shorten timeout interval and clean up timeout message.
  71.    * 
  72. --- 1,12 ----
  73.   #ifndef    lint
  74. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntp.c,v 3.4.1.2 89/03/22 17:51:13 louie Exp Locker: louie $";
  75.   #endif    lint
  76.   
  77.   /*
  78.    *  $Log:    ntp.c,v $
  79. +  * Revision 3.4.1.2  89/03/22  17:51:13  louie
  80. +  * Use a connect UDP socket so we can pick up ICMP error messages.
  81. +  * 
  82.    * Revision 3.4.1.1  89/03/20  00:02:32  louie
  83.    * patch1: Shorten timeout interval and clean up timeout message.
  84.    * 
  85. ***************
  86. *** 126,135 ****
  87.       time_t net_time;
  88.       ref_clock[4] = NULL;
  89.   
  90. -     if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
  91. -         perror("ntp socket");
  92. -         exit(1);
  93. -     }
  94.       timeout.tv_sec = TIME_OUT;
  95.       timeout.tv_usec = 0;
  96.       retry = RETRY_COUNT;
  97. --- 129,134 ----
  98. ***************
  99. *** 182,209 ****
  100.           pkt->stratum = UNSPECIFIED;
  101.           pkt->ppoll = 0;
  102.   
  103.           /*
  104.            * Needed to fill in the time stamp fields
  105.            */
  106.           (void) gettimeofday(&tp, (struct timezone *) 0);
  107.           tstamp(&pkt->xmt, &tp);
  108.   
  109. !         if ((sendto(s, (char *) pkt, sizeof(ntp_data), 0,
  110. !                 (struct sockaddr *) &dst, dstlen)) < 0) {
  111. !             perror("ntp sendto");
  112.               exit(1);
  113.           }
  114.           /*
  115.            * Wait for the reply by watching the file descriptor 
  116.            */
  117. -         FD_ZERO(&readfds);
  118. -         FD_SET(s, &readfds);    /* since it's always modified on ret */
  119.           if ((n = select(FD_SETSIZE, (fd_set *) & readfds, (fd_set *) 0,
  120.                   (fd_set *) 0, &timeout)) < 0) {
  121.               perror("ntp select");
  122.               exit(1);
  123.           }
  124.           if (n == 0) {
  125.               fprintf(stderr,"*Timeout*\n");
  126.               if (--retry)
  127. --- 181,219 ----
  128.           pkt->stratum = UNSPECIFIED;
  129.           pkt->ppoll = 0;
  130.   
  131. +         if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
  132. +             perror("ntp socket");
  133. +             exit(1);
  134. +         }
  135. +         FD_ZERO(&readfds);
  136. +         FD_SET(s, &readfds);    /* since it's always modified on ret */
  137. +         if (connect(s, (struct sockaddr *)&dst, dstlen)) {
  138. +             perror("connect");
  139. +             exit(1);
  140. +         }
  141.           /*
  142.            * Needed to fill in the time stamp fields
  143.            */
  144.           (void) gettimeofday(&tp, (struct timezone *) 0);
  145.           tstamp(&pkt->xmt, &tp);
  146.   
  147. !         if (send(s, (char *) pkt, sizeof(ntp_data), 0) < 0) {
  148. !             perror("send");
  149.               exit(1);
  150.           }
  151.           /*
  152.            * Wait for the reply by watching the file descriptor 
  153.            */
  154.           if ((n = select(FD_SETSIZE, (fd_set *) & readfds, (fd_set *) 0,
  155.                   (fd_set *) 0, &timeout)) < 0) {
  156.               perror("ntp select");
  157.               exit(1);
  158.           }
  159.           if (n == 0) {
  160.               fprintf(stderr,"*Timeout*\n");
  161.               if (--retry)
  162. ***************
  163. *** 217,228 ****
  164.           }
  165.           if ((recvfrom(s, (char *) pkt, sizeof(ntp_data), 0,
  166.                     (struct sockaddr *) &sin, &dstlen)) < 0) {
  167. !             perror("ntp recvfrom");
  168.               exit(1);
  169.           }
  170.           (void) gettimeofday(&tp, (struct timezone *) 0);
  171.           tstamp(&in_timestamp, &tp);
  172.   
  173.           if (verbose) {
  174.               printf("Packet from: [%s]\n", inet_ntoa(sin.sin_addr));
  175.               printf("Leap %d, version %d, mode %s, poll %d, precision %d stratum %d",
  176. --- 227,239 ----
  177.           }
  178.           if ((recvfrom(s, (char *) pkt, sizeof(ntp_data), 0,
  179.                     (struct sockaddr *) &sin, &dstlen)) < 0) {
  180. !             perror("recvfrom");
  181.               exit(1);
  182.           }
  183.           (void) gettimeofday(&tp, (struct timezone *) 0);
  184.           tstamp(&in_timestamp, &tp);
  185.   
  186. +         close(s);
  187.           if (verbose) {
  188.               printf("Packet from: [%s]\n", inet_ntoa(sin.sin_addr));
  189.               printf("Leap %d, version %d, mode %s, poll %d, precision %d stratum %d",
  190.  
  191. Index: ntp_proto.c
  192. Prereq: 3.4.1.1
  193. *** ntp_proto.c.old    Wed Mar 22 18:04:29 1989
  194. --- ntp_proto.c    Wed Mar 22 18:04:31 1989
  195. ***************
  196. *** 1,5 ****
  197.   #ifndef    lint
  198. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntp_proto.c,v 3.4.1.1 89/03/20 00:10:06 louie Exp $";
  199.   #endif
  200.   
  201.   /*
  202. --- 1,5 ----
  203.   #ifndef    lint
  204. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntp_proto.c,v 3.4.1.2 89/03/22 18:02:22 louie Exp Locker: louie $";
  205.   #endif
  206.   
  207.   /*
  208. ***************
  209. *** 10,15 ****
  210. --- 10,22 ----
  211.    *
  212.    *
  213.    * $Log:    ntp_proto.c,v $
  214. +  * Revision 3.4.1.2  89/03/22  18:02:22  louie
  215. +  * Add some fiddles for BROADCAST NTP mode.  In the receive procedure, set the
  216. +  * reachability shift register of peers that are configured, even if we won't
  217. +  * synchronized to them.  Fix adjustment of delay in the process_packet()
  218. +  * routine.  Repair byteswapping problem.
  219. +  * 
  220. +  * 
  221.    * Revision 3.4.1.1  89/03/20  00:10:06  louie
  222.    * patch1: sys.refid could have garbage left if the peer we're synchronized to
  223.    * patch1: is lost.
  224. ***************
  225. *** 287,292 ****
  226. --- 294,315 ----
  227.           enqueue(&peer_list, peer);
  228.       }
  229.   
  230. + #ifdef    BROADCAST_NTP
  231. +     /*
  232. +      *  Input frame matched a funny broadcast peer;  these peers only
  233. +      *  exist to periodically generate broadcasts.  If an input packet
  234. +      *  matched, it means that it looked like it *came* from the broadcast
  235. +      *  address.  This is clearly bogus.
  236. +      */
  237. +     if (peer->flags & PEER_FL_BCAST) {
  238. + #ifdef    DEBUG
  239. +         if (debug > 1)
  240. +             printf("receive: input frame for broadcast peer?\n");
  241. + #endif
  242. +         return;
  243. +     }
  244. + #endif    /* BROADCAST_NTP */
  245.       /* 
  246.        *  "pre-configured" peers are initially assigned a socket index of
  247.        *  -1, which means we don't know which interface we'll use to talk
  248. ***************
  249. *** 305,310 ****
  250. --- 328,343 ----
  251.   
  252.       case MODE_SYM_ACT:
  253.           if (! STRMCMP(pkt->stratum, <=, sys.stratum)) {
  254. +             /*
  255. +              *  While not strictly in the spec, pre-configured
  256. +              *  peers will have their reachability kept, even 
  257. +              *  though they won't be selected.  We might as well
  258. +              *  since we've dedicated the resources to have these
  259. +              *  peers be persistant.
  260. +              */
  261. +             if (peer->flags & PEER_FL_CONFIG)
  262. +                 peer->reach |= 1;
  263.               switch (peer->mode) {
  264.               case MODE_SYM_ACT:
  265.               case MODE_CLIENT:
  266. ***************
  267. *** 344,350 ****
  268. --- 377,385 ----
  269.           }
  270.           break;
  271.   
  272. + #ifdef    BROADCAST_NTP
  273.       case MODE_BROADCAST:
  274. + #endif
  275.       receive_MODE_BROADCAST:    
  276.           if (peer->flags & PEER_FL_CONFIG)
  277.               break;
  278. ***************
  279. *** 424,432 ****
  280.       delay = (t2 - t1) - (t3 - t4);
  281.       offset = ((t2 - t1) + (t3 - t4)) / 2.0;
  282.   
  283. !     delay = MAX(delay, 1.0/(1<< -sys.precision) +
  284. !             1.0/(1<< -peer->precision) + NTP_MAXSKW);
  285.   
  286.       delay = MAX(delay, NTP_MINDIST);
  287.   
  288.       peer->valid = 0;
  289. --- 459,473 ----
  290.       delay = (t2 - t1) - (t3 - t4);
  291.       offset = ((t2 - t1) + (t3 - t4)) / 2.0;
  292.   
  293. !     delay += NTP_MAXSKW + 1.0/(unsigned long)(1L << -sys.precision);
  294. !     if (-peer->precision < sizeof(long))
  295. !         delay += 1.0/(unsigned long)(1L << -peer->precision);
  296.   
  297. +     if (delay < 0.0) {
  298. +         peer->pkt_dropped++;
  299. +         return;
  300. +     }
  301.       delay = MAX(delay, NTP_MINDIST);
  302.   
  303.       peer->valid = 0;
  304. ***************
  305. *** 778,784 ****
  306.   #endif
  307.           sys.peer = NULL;
  308.           sys.stratum = 0;
  309. !         sys.refid = 'N'<<24 | 'O'<<16 | 'N'<<8 | 'E';
  310.           return;
  311.       }
  312.   
  313. --- 819,825 ----
  314.   #endif
  315.           sys.peer = NULL;
  316.           sys.stratum = 0;
  317. !         sys.refid = htonl('N'<<24 | 'O'<<16 | 'N'<<8 | 'E');
  318.           return;
  319.       }
  320.   
  321.  
  322. Index: ntpd.c
  323. Prereq: 3.4.1.1
  324. *** ntpd.c.old    Wed Mar 22 18:04:36 1989
  325. --- ntpd.c    Wed Mar 22 18:04:38 1989
  326. ***************
  327. *** 1,9 ****
  328.   #ifndef    lint
  329. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntpd.c,v 3.4.1.1 89/03/20 00:12:10 louie Exp $";
  330.   #endif    lint
  331.   
  332.   /*
  333.    *  $Log:    ntpd.c,v $
  334.    * Revision 3.4.1.1  89/03/20  00:12:10  louie
  335.    * patch1: Diddle syslog messages a bit.  Handle case of udp/ntp not being
  336.    * patch1: defined in /etc/services.  Compute default value for tickadj if
  337. --- 1,13 ----
  338.   #ifndef    lint
  339. ! static char *rcsid = "$Header: /usr/users/louie/ntp/RCS/ntpd.c,v 3.4.1.2 89/03/22 18:03:17 louie Exp Locker: louie $";
  340.   #endif    lint
  341.   
  342.   /*
  343.    *  $Log:    ntpd.c,v $
  344. +  * Revision 3.4.1.2  89/03/22  18:03:17  louie
  345. +  * The peer->refid field was being htonl()'ed when it was already in network
  346. +  * byte order.
  347. +  * 
  348.    * Revision 3.4.1.1  89/03/20  00:12:10  louie
  349.    * patch1: Diddle syslog messages a bit.  Handle case of udp/ntp not being
  350.    * patch1: defined in /etc/services.  Compute default value for tickadj if
  351. ***************
  352. *** 231,242 ****
  353.           setlogmask(LOG_UPTO(LOG_INFO));
  354.   #endif    /* LOG_DAEMON */
  355.   
  356. !     syslog(LOG_NOTICE, "%s version $Revision: 3.4.1.1 $", prog_name);
  357.       syslog(LOG_NOTICE, "patchlevel %d", PATCHLEVEL);
  358.   
  359.   #ifdef    DEBUG
  360.       if (debug)
  361. !         printf("%s version $Revision: 3.4.1.1 $ patchlevel %d\n",
  362.                  prog_name, PATCHLEVEL);
  363.   #endif
  364.       (void) setpriority(PRIO_PROCESS, 0, -10);
  365. --- 235,246 ----
  366.           setlogmask(LOG_UPTO(LOG_INFO));
  367.   #endif    /* LOG_DAEMON */
  368.   
  369. !     syslog(LOG_NOTICE, "%s version $Revision: 3.4.1.2 $", prog_name);
  370.       syslog(LOG_NOTICE, "patchlevel %d", PATCHLEVEL);
  371.   
  372.   #ifdef    DEBUG
  373.       if (debug)
  374. !         printf("%s version $Revision: 3.4.1.2 $ patchlevel %d\n",
  375.                  prog_name, PATCHLEVEL);
  376.   #endif
  377.       (void) setpriority(PRIO_PROCESS, 0, -10);
  378. ***************
  379. *** 888,901 ****
  380.           }
  381.       }
  382.   #ifdef    SETTICKADJ
  383. - #ifdef    DEBUG
  384. -     if (debug) {
  385. -         printf("kernel vars: tickadj = %d, hz = %d, tick = %d\n",
  386. -                kern_tickadj, kern_hz, kern_tick);
  387. -         printf("desired tickadj = %d, dotickadj = %d\n", tickadj,
  388. -                dotickadj);
  389. -     }
  390. - #endif
  391.       /*
  392.        *  If desired value of tickadj is not specified in the configuration
  393.        *  file, compute a "reasonable" value here, based on the assumption 
  394. --- 892,897 ----
  395. ***************
  396. *** 906,911 ****
  397. --- 902,916 ----
  398.       if (tickadj == 0 && kern_hz)
  399.           tickadj = 500/kern_hz;
  400.   
  401. + #ifdef    DEBUG
  402. +     if (debug) {
  403. +         printf("kernel vars: tickadj = %d, hz = %d, tick = %d\n",
  404. +                kern_tickadj, kern_hz, kern_tick);
  405. +         printf("desired tickadj = %d, dotickadj = %d\n", tickadj,
  406. +                dotickadj);
  407. +     }
  408. + #endif
  409.       if (dotickadj && tickadj && (tickadj != kern_tickadj)) {
  410.           close(kmem);
  411.           if ((kmem = open(memory, O_RDWR)) >= 0) {
  412. ***************
  413. *** 1051,1057 ****
  414.           cip->estdisp = htonl((long) (peer->estdisp * 1000.0));
  415.           cip->estdelay = htonl((long) (peer->estdelay * 1000.0));
  416.           cip->estoffset = htonl((long) (peer->estoffset * 1000.0));
  417. !         cip->refid = htonl(peer->refid);
  418.           cip->reftime.int_part = htonl(peer->reftime.int_part);
  419.           cip->reftime.fraction = htonl(peer->reftime.fraction);
  420.   
  421. --- 1056,1062 ----
  422.           cip->estdisp = htonl((long) (peer->estdisp * 1000.0));
  423.           cip->estdelay = htonl((long) (peer->estdelay * 1000.0));
  424.           cip->estoffset = htonl((long) (peer->estoffset * 1000.0));
  425. !         cip->refid = peer->refid;
  426.           cip->reftime.int_part = htonl(peer->reftime.int_part);
  427.           cip->reftime.fraction = htonl(peer->reftime.fraction);
  428.   
  429.  
  430. Index: ntpdc.c
  431. Prereq: 3.4.1.1
  432. *** ntpdc.c.old    Wed Mar 22 18:04:43 1989
  433. --- ntpdc.c    Wed Mar 22 18:04:44 1989
  434. ***************
  435. *** 1,9 ****
  436.   #ifndef    lint
  437. ! static char *RCSid = "$Header: /usr/users/louie/ntp/RCS/ntpdc.c,v 3.4.1.1 89/03/20 00:13:41 louie Exp $";
  438.   #endif
  439.   
  440.   /*
  441.    * $Log:    ntpdc.c,v $
  442.    * Revision 3.4.1.1  89/03/20  00:13:41  louie
  443.    * patch1: Delete unused variables.  Display interface address in numeric form
  444.    * patch1: for local address, rather than symbolically.  For multiple host
  445. --- 1,13 ----
  446.   #ifndef    lint
  447. ! static char *RCSid = "$Header: /usr/users/louie/ntp/RCS/ntpdc.c,v 3.4.1.2 89/03/22 18:04:18 louie Exp Locker: louie $";
  448.   #endif
  449.   
  450.   /*
  451.    * $Log:    ntpdc.c,v $
  452. +  * Revision 3.4.1.2  89/03/22  18:04:18  louie
  453. +  * Display dispersion in milliseconds.  The peer->refid field was being ntohl()'ed
  454. +  * when it should have stayed in network byte order.
  455. +  * 
  456.    * Revision 3.4.1.1  89/03/20  00:13:41  louie
  457.    * patch1: Delete unused variables.  Display interface address in numeric form
  458.    * patch1: for local address, rather than symbolically.  For multiple host
  459. ***************
  460. *** 176,182 ****
  461.           if ((cc = recvfrom(s, packet, sizeof(packet), 0,
  462.                    (struct sockaddr *)&from, &fromlen)) <= 0) {
  463.               if (cc == 0 || errno == EINTR)
  464. !                     continue;
  465.               perror("recvfrom");
  466.               (void) close(s);
  467.               exit(1);
  468. --- 180,186 ----
  469.           if ((cc = recvfrom(s, packet, sizeof(packet), 0,
  470.                    (struct sockaddr *)&from, &fromlen)) <= 0) {
  471.               if (cc == 0 || errno == EINTR)
  472. !                 continue;
  473.               perror("recvfrom");
  474.               (void) close(s);
  475.               exit(1);
  476. ***************
  477. *** 279,285 ****
  478.           delay[i] = (double) ((long) (ntohl(n->info_filter.delay[i])/1000.0));
  479.           offset[i] = (double) ((long) (ntohl(n->info_filter.offset[i])/1000.0));
  480.       }
  481. !     dsp = ((long) ntohl(n->estdisp))/1000.0;
  482.       del = (long) ntohl(n->estdelay);    /* leave in milliseconds */
  483.       off = (long) ntohl(n->estoffset);    /* leave in milliseconds */
  484.       c = ' ';
  485. --- 283,289 ----
  486.           delay[i] = (double) ((long) (ntohl(n->info_filter.delay[i])/1000.0));
  487.           offset[i] = (double) ((long) (ntohl(n->info_filter.offset[i])/1000.0));
  488.       }
  489. !     dsp = ((long) ntohl(n->estdisp));    /* leave in milliseconds */
  490.       del = (long) ntohl(n->estdelay);    /* leave in milliseconds */
  491.       off = (long) ntohl(n->estoffset);    /* leave in milliseconds */
  492.       c = ' ';
  493. ***************
  494. *** 310,318 ****
  495.           delay[i] = (double) (long) ntohl(n->info_filter.delay[i]);
  496.           offset[i] = (double) (long) ntohl(n->info_filter.offset[i]);
  497.       }
  498. !     dsp = (double) ((long) ntohl(n->estdisp)) / 1000.0;
  499. !     del = (double) ((long) ntohl(n->estdelay));
  500. !     off = (double) ((long) ntohl(n->estoffset));
  501.       printf("Neighbor address %s port:%d",
  502.              inet_ntoa(sin.sin_addr), (int)ntohs(n->port));
  503.       sin.sin_addr.s_addr = n->my_address;
  504. --- 314,322 ----
  505.           delay[i] = (double) (long) ntohl(n->info_filter.delay[i]);
  506.           offset[i] = (double) (long) ntohl(n->info_filter.offset[i]);
  507.       }
  508. !     dsp = (double) ((long) ntohl(n->estdisp));    /* in milliseconds */
  509. !     del = (double) ((long) ntohl(n->estdelay));    /* in milliseconds */
  510. !     off = (double) ((long) ntohl(n->estoffset));    /* in milliseconds */
  511.       printf("Neighbor address %s port:%d",
  512.              inet_ntoa(sin.sin_addr), (int)ntohs(n->port));
  513.       sin.sin_addr.s_addr = n->my_address;
  514. ***************
  515. *** 326,337 ****
  516.       if (n->stratum == 1 || n->stratum == 0) {
  517.           u_long TmP;
  518.   
  519. -         TmP = ntohl(n->refid);
  520.           (void) strncpy(ref_clock, (char *) &TmP, 4);
  521.           ref_clock[4] = '\0';
  522.           printf("Reference clock ID: %s", ref_clock);
  523.       } else {
  524. !         clock_host.s_addr = (u_long) ntohl(n->refid);
  525.           printf("Reference clock ID: [%s]", inet_ntoa(clock_host));
  526.       }
  527.       printf(" timestamp: %08lx.%08lx\n", ntohl(n->reftime.int_part),
  528. --- 330,340 ----
  529.       if (n->stratum == 1 || n->stratum == 0) {
  530.           u_long TmP;
  531.   
  532.           (void) strncpy(ref_clock, (char *) &TmP, 4);
  533.           ref_clock[4] = '\0';
  534.           printf("Reference clock ID: %s", ref_clock);
  535.       } else {
  536. !         clock_host.s_addr = (u_long) n->refid;
  537.           printf("Reference clock ID: [%s]", inet_ntoa(clock_host));
  538.       }
  539.       printf(" timestamp: %08lx.%08lx\n", ntohl(n->reftime.int_part),
  540.